package com.szrt.day20161018.demo05;


/**
 * 
 * Entity  后缀：  告诉别人我这个类   这个类与某个表的表结构11对应
 * 
 * 规则：原则：所有在Entity里面的属性都必须是private 
 * 
 * 写完属性之后：
 * 1：　must 自动生成set和get方法...  千万不要去私自修改set/get里面的任何代码
 * 
 * 2:  may  toString
 * 
 * CREATE TABLE `crm_student_t` (
	  `ID` int(11) NOT NULL DEFAULT '0',
	  `STUDENT_NAME` varchar(128) DEFAULT NULL COMMENT '姓名',
	  `AGE` int(11) NOT NULL DEFAULT '0' COMMENT '年龄',
	  `SEX` varchar(64) DEFAULT NULL COMMENT '性别',
	  PRIMARY KEY (`ID`,`AGE`)
	) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 * @author Administrator
 *
 */
public class StudentEntity {
	
	
	
	/**
	 * id
	 */
	private int id;
	
	//姓名  错误！！！！！！！！！ 
	
	/**
	 * 姓名
	 */
	private String studentName; 
	
	/**
	 * 年龄
	 */
	private int age;
	
	/**
	 * 性别
	 */
	private String sex;
	
	

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getStudentName() {
		return studentName;
	}

	public void setStudentName(String studentName) {
		this.studentName = studentName;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Override
	public String toString() {
		return "StudentEntity [id=" + id + ", studentName=" + studentName + ", age=" + age + ", sex=" + sex + "]";
	}

	public StudentEntity(){
		System.out.println("进入无参的构造方法....");
		
	}
	
	public StudentEntity(int id, String studentName, int age, String sex) {
		System.out.println("进入有参的构造方法....");
		this.id = id;
		this.studentName = studentName;
		this.age = age;
		this.sex = sex;
	}
	
	
	
	
	
	
	

}
